package meconsea.life.util;

import java.io.Serializable;

import meconsea.life.sys.module.SysModule;

import org.apache.log4j.Logger;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class GuiceUtil {
	private final static Logger log = Logger.getLogger(GuiceUtil.class);
	
	private static GuiceUtil _instance; 
	private Injector injector;
	private GuiceUtil(){
		injector = Guice.createInjector(new SysModule());
	}
	public static GuiceUtil getInstance(){
		if(_instance == null)
			_instance = new GuiceUtil();
		return _instance;
	}
	public  Object getInstanceClass(Class  t){ 
		return injector.getInstance(t);
	} 
}
